package com.pj.point.util.view;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;

import androidx.annotation.NonNull;

import com.pj.point.R;


public class MyDialog extends android.app.Dialog {
    public MyDialog(@NonNull Context context) {
        super(context, R.style.CustomDialog);
    }

    public View createView(Context context, int dialog_layout){
//      放入布局文件
        LayoutInflater inflate = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
//      布局转成View对象
        View view = inflate.inflate(dialog_layout, null);
//      显示布局
        setContentView(view);

        return view;

    }

}
